﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ComunesMGI.DataTypes
{
    [Serializable]
    public class DataTarea
    {
        private string _idTarea;
        private string _descripcion;

        public string IdTarea
        {
            get { return _idTarea; }
            set { _idTarea = value; }
        }

        public string Descripcion
        {
            get { return _descripcion; }
            set { _descripcion = value; }
        }

        public DataTarea(string idTarea, string descripcion)
        {
            this._idTarea = idTarea;
            this._descripcion = descripcion;
        }

        public override bool Equals(Object obj)
        {
            DataTarea tarea = (DataTarea)obj;
            return ((this.Descripcion == tarea.Descripcion) && (this.IdTarea == tarea.IdTarea));

        }

        public override int GetHashCode()
        {

            int hash = 0;
            if(this._descripcion!=null)
                hash ^= this._descripcion.GetHashCode();
            hash ^= this._idTarea.GetHashCode();
            return hash;
        }

    }
}
